package com.boss.service.impl;

import com.boss.entity.JobClassify;
import com.boss.mapper.JobClassifyMapper;
import com.boss.service.JobClassifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;
//职业分类
@Service
public class JobClassifyServiceImpl implements JobClassifyService {
    @Autowired
    private JobClassifyMapper jobClassifyMapper;
    //获取所有一级分类
    @Override
    public List<JobClassify> getAllJobClassify1(Integer parentId) {
        //判断是否是错误参数
       if(parentId != null){
           if(parentId < 1){
               parentId = null;
           }else if(parentId > 10000000){
               parentId = null;
           }
       }
        return jobClassifyMapper.getAllJobClassify1(parentId);
    }
}
